import pika

conection = pika.BlockingConnection(pika.ConnectionParameters("localhost"));
channel = conection.channel();
channel.queue_declare(queue='hello')

channel.basic_publish(exchange='',
                      routing_key='hello',   #queue名字
                      body='Hello World!')  ;
conection.close()
